﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TibcoMessageAdmin
{
    public partial class frmEdit : Form
    {
        string _xml = "";
        bool _cancelled = false;

        public bool cancelled
        {

            get
            {
                return _cancelled;

            }

            set
            {
                _cancelled = value;

            }


        }
        public frmEdit()
        {
            InitializeComponent();
        }

        private void cmdCancel_Click(object sender, EventArgs e)
        {
            this.Close();
            _cancelled = true;
           
        }


        public string xml
        {
            get
            {
                return _xml;
            }

            set
            {
                _xml = value;                
            }
        }

        private void cmdOk_Click(object sender, EventArgs e)
        {
            this.xml = textBox1.Text;
            _cancelled = false ;
            this.Close(); 

        }

        private void frmEdit_Load(object sender, EventArgs e)
        {
            textBox1.Text = _xml; 
        }

        private void frmEdit_Resize(object sender, EventArgs e)
        {
            textBox1.Size = new Size(this.Width - 50, this.Height - 120);
            panel1.Top = this.Height - 90;
            panel1.Left = this.Width - 270;


        }

        private void cmdFont_Click(object sender, EventArgs e)
        {
            fontDialog1.ShowDialog();            
            
            if (fontDialog1.Font != null)
            {
                textBox1.Font = fontDialog1.Font;    

            }
  
            
        }



    }
}
